Skip to content

Fix: Estimated cost based on TX and not hardcoded value #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

1yam
Copy link
Member

@1yam 1yam commented Apr 2, 2025

This PR mostly simplify the logic on instance delete using error hadnling change in PR

Related ClickUp, GitHub or Jira tickets : ALEPH-496

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.

Changes

This pull request includes updates to dependencies and error handling improvements in the delete function. The most important changes are listed below:

Dependency Updates:

  • Updated the aleph-sdk-python dependency to a specific branch 1yam-fix-estimated-gas in pyproject.toml. (This need to be revert since it depends on it)

Error Handling Improvements:

  • Removed a redundant safety check for account transactions and added specific error handling for InsufficientFundsError in the delete function in src/aleph_client/commands/instance/__init__.py.

How to test

Explain how to test your PR.
This PR can be tested by using empty wallet with not enough gas / aleph otken

Notes

No change is made on instance create for UX reason we keep the pre check early.

@1yam 1yam force-pushed the 1yam-fix-gas-estimations branch from 937bb7c to 3548b53 Compare April 29, 2025 13:07
Copy link

codecov bot commented Apr 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.75%. Comparing base (20a3e1f) to head (9fdba57).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #359      +/-   ##
==========================================
- Coverage   61.58%   60.75%   -0.84%     
==========================================
  Files          19       19              
  Lines        3379     3386       +7     
  Branches      473      474       +1     
==========================================
- Hits         2081     2057      -24     
- Misses       1056     1087      +31     
  Partials      242      242              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aleph-im aleph-im deleted a comment from github-actions bot May 20, 2025
@1yam 1yam force-pushed the 1yam-fix-gas-estimations branch from 9abd6fa to aff8dad Compare May 27, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants